package br.com.gaacorp.sai.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.ManyToOne;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;

/**
 * This class is used to represent an student with ra and schoolClass
 * information.
 * 
 * @author guilherme de assis
 */
@Embeddable
public class Student extends BaseObject implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3179913115627650326L;

	private String ra; // registro academico.

	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof Student)) {
			return false;
		}

		final Student student1 = (Student) o;

		return this.hashCode() == student1.hashCode();
	}

	@Column(length = 150)
	public String getRa() {
		return ra;
	}

	public int hashCode() {
		// TODO Auto-generated method stub
		return 0;
	}

	public void setRa(String ra) {
		this.ra = ra;
	}

	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
				.append("ra", this.ra).toString();
	}

}
